package com.jprocms.module.cms.controller.admin.guestbook.vo;

import com.jpro.framework.common.pojo.PageParam;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Collection;
import java.util.Date;

import static com.jpro.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "留言板分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class GuestbookPageReqVO extends PageParam {

    @Schema(description = "站点ID", example = "29114")
    private Long siteId;

    @Schema(description = "类型(数据字典cms_guestbook_type值)", example = "1")
    private Integer guestbookType;

    @Schema(description = "留言标题")
    private String title;

    @Schema(description = "手机号")
    private String msgPhone;

    @Schema(description = "电子邮箱")
    private String msgEmail;

    @Schema(description = "是否公开")
    private Integer isOpen;

    @Schema(description = "是否回复")
    private Integer isReplied;

    @Schema(description = "是否推荐")
    private Integer recommended;

    @Schema(description = "状态(0:已审核,1:未审核,2:已屏蔽)", example = "1")
    private Integer status;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private Date[] createTime;

    @Schema(description = "回复时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private Date[] replyDate;

    //service组装给xml使用，前端用传递
    @Schema(description = "创建时间查询开始时间")
    private Date createTimeBegin;

    @Schema(description = "创建时间查询结束时间")
    private Date createTimeEnd;
    @Schema(description = "回复时间查询开始时间")
    private Date replyDateBegin;

    @Schema(description = "回复时间查询结束时间")
    private Date replyDateEnd;
    //后端组装构建排序
    private Collection<OrderItem> orderItems;

}
